<script>
import { Upload } from 'ant-design-vue';
import { ACCESS_TOKEN } from "@/store/mutation-types"
import Vue from 'vue'
export default {
    name:'XUpload',
    extends:Upload,
    props:{
        headers:{
            type:Object,
            default: ()=>{
                const token = Vue.ls.get(ACCESS_TOKEN)
                let headers = {}
                if (token) {
                    headers['X-Access-Token'] = token
                }
                return headers
            }
        }
    }
}
</script>

